Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2nd panel to the gauge demo dac #50

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

AntoineThebaud
Copy link
Contributor

No description provided.

Copy link

Dashboard previews

The following ephemeral dashboards have been deployed:

Copy link

Dashboard diffs

showcase-dac-gaugechartpanel:
{
   "panels": {
     "0_0": {
       "kind": "Panel",
       "spec": {
         "display": {
           "name": "Single Gauge"
         },
         "plugin": {
           "kind": "GaugeChart",
           "spec": {
             "calculation": "mean",
             "format": {
               "unit": "percent"
             },
             "thresholds": {
               "steps": [
                 {
                   "value": 20
                 }
               ]
             }
           }
         },
         "queries": [
           {
             "kind": "TimeSeriesQuery",
             "spec": {
               "plugin": {
                 "kind": "PrometheusTimeSeriesQuery",
                 "spec": {
                   "query": "100 - ((node_memory_MemAvailable_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"} * 100) / node_memory_MemTotal_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"})"
                 }
               }
             }
           }
         ]
       }
+    },
+    "0_1": {
+      "kind": "Panel",
+      "spec": {
+        "display": {
+          "name": "Second Gauge"
+        },
+        "plugin": {
+          "kind": "GaugeChart",
+          "spec": {
+            "calculation": "last",
+            "format": {
+              "unit": "bytes"
+            },
+            "max": 20
+          }
+        },
+        "queries": [
+          {
+            "kind": "TimeSeriesQuery",
+            "spec": {
+              "plugin": {
+                "kind": "PrometheusTimeSeriesQuery",
+                "spec": {
+                  "query": "100 - ((node_memory_MemAvailable_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"} * 100) / node_memory_MemTotal_bytes{env=\"demo\", instance=\"demo.do.prometheus.io:9100\"})"
+                }
+              }
+            }
+          }
+        ]
+      }
     }
   },
   "layouts": [
     {
       "kind": "Grid",
       "spec": {
         "display": {
           "title": "Row 1"
         },
         "items": [
           {
             "x": 0,
             "y": 0,
             "width": 8,
             "height": 6,
             "content": {
               "$ref": "#/spec/panels/0_0"
             }
+          },
+          {
+            "x": 8,
+            "y": 0,
+            "width": 8,
+            "height": 6,
+            "content": {
+              "$ref": "#/spec/panels/0_1"
+            }
           }
         ]
       }
     }
   ],
   "duration": "1h"
 }

@AntoineThebaud AntoineThebaud marked this pull request as ready for review December 19, 2024 14:30
@AntoineThebaud AntoineThebaud merged commit ec6b37e into main Dec 19, 2024
4 checks passed
@AntoineThebaud AntoineThebaud deleted the antoinethebaud/gauge-demo-add-2nd branch December 19, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant